package com.my.chapter4;

public class practice4 {
    public static void main(String[] args) {
        int k=0;
        for(int i=2;i<=100;i++){
            int j=2;
            for(;j< Math.sqrt(i);j++){
                if(i%j==0){
                    break;
                }
            }
            if(j> Math.sqrt(i)){
                k++;
                System.out.print(i+" ");
                if(k==10){
                    k=0;
                    System.out.println("");
                }
            }
        }
    }
}
